<FIELDSET>
    <legend>Teaser <span id="hide">(<a href="javascript: hideTeaser();">hide</a>)</span><span id="unhide" style="display: none;">(<a href="javascript: unhideTeaser();">unhide</a>)</span></legend>
    <div id="teaser">
    
    <label>Teaser Title:</label>
    <input type="text" name="teaser_title" class="textinput" value="{$page.teaser_title|sslash}" id="teaserTitle" />
    
    <label>Teaser:</label>
    <textarea name="teaser" class="tinymce mceEditor" rows="15" cols="40">
       {$page.teaser|sslash}
    </textarea><br />
    
    <label for="upimg">Image (jpg only):</label>
    {if $page.image == 't'}
        <br />
        <div class="nodeimgdiv" id="nodeimgdiv"><img src="{$INA.root}{$filePath}image/80x60.jpg" class="nodeimg" /><br />
        <a href="javascript: deleteImage('{$smarty.get.node}','{$smarty.get.id}');" class="admin">delete</a>
        <input type="hidden" name="img" id="img" value="1" />
        </div>        
        <input style="display: none" type="file" name="nodeimage" value="" id="upimg" class="textinput" style="width: 100%;" />
    {else}
        <input type="file" name="nodeimage" value="" id="upimg" class="textinput" style="width: 100%;" />
    {/if}
    
    
    <hr />
    
    <label>Title for Hotel Description:</label>
    <input type="text" name="hotel_title" class="textinput" value="{$page.hotel_title|sslash}" id="hotelTitle" />
    
    <label>Hotel Description:</label>
    <textarea name="hotel_desc" class="tinymce mceEditor" rows="15" cols="40">
       {$page.hotel_desc|sslash}
    </textarea><br /><br />
    
    <label>Offer valid from ...</label>
    <div class="date_selector">{html_select_date prefix="StartDate" time=$page.valid_from end_year="+3" display_days=true }</div>
    <label>Offer valid to ...</label>
    <div class="date_selector">{html_select_date prefix="EndDate" time=$page.valid_to end_year="+3" display_days=true }</div><br /><br />
    
    <label>Service Title:</label>
    <input type="text" name="service_title" class="textinput" value="{$page.service_title|sslash}" id="serviceTitle" />
       
    <label>Service Description:</label>
    <textarea name="service_desc" class="tinymce mceEditor" rows="15" cols="40">
       {$page.service_desc|sslash}
    </textarea><br />
    
	<label>Hotel Facilites Title:</label>
	<input type="text" name="fasc_title" class="textinput" value="{$page.fasc_title|sslash}" id="fascTitle" />
	
    <div class="textinput_title"><label>Title</label></div><div class="textinput_desc"><label>&nbsp;Description</label></div>
    <input type="text" name="fasc_1_title" class="textinput_title" value="{$page.fasc_1_title|sslash}" id="fasc1Title" />
    
    <input type="text" name="fasc_1_desc" class="textinput_desc" value="{$page.fasc_1_desc|sslash}" id="fasc1Desc" />

    <input type="text" name="fasc_2_title" class="textinput_title" value="{$page.fasc_2_title|sslash}" id="fasc2Title" />
    <input type="text" name="fasc_2_desc" class="textinput_desc" value="{$page.fasc_2_desc|sslash}" id="fasc2Desc" />
    
    <input type="text" name="fasc_3_title" class="textinput_title" value="{$page.fasc_3_title|sslash}" id="fasc3Title" />
    <input type="text" name="fasc_3_desc" class="textinput_desc" value="{$page.fasc_3_desc|sslash}" id="fasc3Desc" />
    
    <input type="text" name="fasc_4_title" class="textinput_title" value="{$page.fasc_4_title|sslash}" id="fasc4Title" />
    <input type="text" name="fasc_4_desc" class="textinput_desc" value="{$page.fasc_4_desc|sslash}" id="fasc4Desc" />
    
    <input type="text" name="fasc_5_title" class="textinput_title" value="{$page.fasc_5_title|sslash}" id="fasc5Title" />
    <input type="text" name="fasc_5_desc" class="textinput_desc" value="{$page.fasc_5_desc|sslash}" id="fasc5Desc" />
    
    <input type="text" name="fasc_6_title" class="textinput_title" value="{$page.fasc_6_title|sslash}" id="fasc6Title" />
    <input type="text" name="fasc_6_desc" class="textinput_desc" value="{$page.fasc_6_desc|sslash}" id="fasc6Desc" />
    
    <input type="text" name="fasc_7_title" class="textinput_title" value="{$page.fasc_7_title|sslash}" id="fasc7Title" />
    <input type="text" name="fasc_7_desc" class="textinput_desc" value="{$page.fasc_7_desc|sslash}" id="fasc7Desc" />
    
    <input type="text" name="fasc_8_title" class="textinput_title" value="{$page.fasc_8_title|sslash}" id="fasc8Title" />
    <input type="text" name="fasc_8_desc" class="textinput_desc" value="{$page.fasc_8_desc|sslash}" id="fasc8Desc" />
    </div>
</fieldset>

{literal}
<script language="JavaScript">
    function checkNewSupplier(obj){
        if(obj.value == 'New'){
            unhide('supplier_name');
            document.getElementById('supplier_name').focus();
        }else{
            hide('supplier_name');
        }
    }
    
    function getCoordinates(nodeid,pageid){            
        showLoad();
        
        (new AjaxRequest).send({
                url			: urlBase+"action=getCoordinates",
                data		: {
                    adr_1    :
                encodeURIComponent(document.getElementById('adr_1').value),
                    adr_2    :
                encodeURIComponent(document.getElementById('adr_2').value),
                    adr_city :
                encodeURIComponent(document.getElementById('adr_city').value),
                    adr_zip  :
                encodeURIComponent(document.getElementById('adr_zip').value),
                    adr_country :
                encodeURIComponent(document.getElementById('adr_country').value)
                },
                
                onSuccess	: function(data, info)
                {
                    if(data.longitude){
                        document.getElementById('gmaps_long').value = data.longitude;
                    }
                    
                    if(data.latitude){
                        document.getElementById('gmaps_lat').value = data.latitude;
                    }
                    
                    if(!data.longitude && !data.latitude){
                        alert('Could not calculate coordinates, sorry!');
                    }else{
                        Fat.fade_element('c1',10,1000,"#ffffcc");
                    }
                    
                    //hide the loader
                    hideLoad();
                }
        });
    }
</script>
{/literal}

<FIELDSET>
    <legend>Content (AID: {$page.id})</legend>
    <label for="dataTitle">Title:</label>
    <input type="text" name="title" class="textinput" value="{$page.title|sslash}" id="dataTitle" />
    <br />
    <label>Content:</label>
    <textarea name="content" rows="20" cols="40" class="tinymce mceEditor">
       {$page.content|sslash}
    </textarea>
    <br />
    <table width="98%">
        <thead>
            <tr>
                <th>Property</th>
                <th>Value</th>
            </tr>
        </thead>
        <tbody>
            <tr style="background-color: {cycle values="#eee,#fff"};">
                <td style="white-space: nowrap;" align="right" width="200">Base Price:&nbsp;</td>
                <td><input type="text" name="base_price" style="width: 100px; font-size: 15px; font-weight: bold;" value="{$page.price|default:'0'|currency}" />&nbsp;EUR</td>
            </tr>
            <tr style="background-color: {cycle values="#eee,#fff"};">
                <td style="white-space: nowrap;" align="right">Discount Price:&nbsp;</td>
                <td><input type="text" name="discount_price" style="width: 100px; font-size: 15px; font-weight: bold;" value="{$page.price_kids|default:'0'|currency}" />&nbsp;EUR</td>
            </tr>
             
            <tr style="background-color: {cycle values="#eee,#fff"};">
                <td style="white-space: nowrap;" align="right">PAYPAL Button HTML:&nbsp;</td>
                <td><textarea name="paypal_button_id" style="width: 100%; font-weight: bold; height: 100px;">{$page.paypal_button_id|escape|stripslashes}</textarea></td>
            </tr>
           
            <!--<input type="hidden" name="kid_age" style="width: 30px; font-weight: bold;" value="{$page.kid_age|default:'12'}" />-->

            
            <tr style="background-color: {cycle values="#eee,#fff"};">
                <td style="white-space: nowrap;" align="right">VAT:&nbsp;</td>
                <td><input type="text" name="tax" style="width: 50px; font-size: 13px;" value="{$page.tax*100|default:'20'}" />&nbsp;%</td>
            </tr>
            <tr style="background-color: {cycle values="#eee,#fff"};">
                <td align="right">Supplier:&nbsp;</td>
                <td>
                    <select name="supplier" onchange="checkNewSupplier(this);">
                        <option value="">----</option>
                        {html_options options=$suppliers selected=$page.supplier}
                        <option value="New">New...</option>
                    </select>
                    <input type="text" name="supplier_name" value="Supplier Name..." style="display: none;" id="supplier_name" />
                </td>
            </tr>
            <tr style="background-color: {cycle values="#eee,#fff"};">
                <td style="white-space: nowrap;" align="right">Supplier AID:&nbsp;</td>
                <td>
                    <input type="text" name="supplier_aid" style="width: 100px;" value="{$page.supplier_aid|default:'000000'}" />
                </td>
            </tr>
            <tr style="background-color: {cycle values="#eee,#fff"};">
                <td style="white-space: nowrap;" align="right">Title on Ticket:&nbsp;</td>
                <td>
                    <input type="text" name="ticket_title" style="width: 98%;" value="{$page.ticket_title|default:$page.title}" />
                </td>
            </tr>
            <tr style="background-color: {cycle values="#eee,#fff"};">
                <td style="white-space: nowrap;" align="right">Text on Ticket:&nbsp;</td>
                <td>
                    <textarea name="ticket_text" rows="10" cols="40" style="width: 100%;">{$page.ticket_text|sslash|default:'Hello World'}</textarea>
                </td>
            </tr>
            <tr style="background-color: {cycle values="#eee,#fff"};">
                <td style="white-space: nowrap;" align="right">Terms and Conditions:&nbsp;</td>
                <td>
                    <textarea class="tinymce mceEditor" name="tac_hotel" rows="10" cols="40" style="width: 100%;">{$page.tac_hotel|sslash}</textarea>
                </td>
            </tr>            
            
            <tr style="background-color: {cycle values="#eee,#fff"};">
                <td style="white-space: nowrap;" align="right">Show On Splash Page:&nbsp;</td>
                <td>
                    <input type="checkbox" name="on_splash" value="t" {if $page.on_splash == 't'}checked{/if} />
                </td>
            </tr>
            
        </tbody>
    </table>   
    <br />
    <table width="98%">
        <thead>
            <tr>
                <th>Google Maps Tie</th>
                <th>&nbsp;</th>
            </tr>
        </thead>
        <tbody>
        	
            <tr style="background-color: {cycle values="#eee,#fff"};">
                <td style="white-space: nowrap;" align="right" width="200">House Number:&nbsp;</td>
                <td><input type="text" name="adr_1" id="adr_1" style="width: 98%;" value="{$page.adr_1}" /></td>
            </tr>
            
            <tr style="background-color: {cycle values="#eee,#fff"};">
                <td style="white-space: nowrap;" align="right" width="200">Street:&nbsp;</td>
                <td><input type="text" name="adr_2" id="adr_2" style="width: 98%;" value="{$page.adr_2}" /></td>
            </tr>
            
            <tr style="background-color: {cycle values="#eee,#fff"};">
                <td style="white-space: nowrap;" align="right" width="200">City:&nbsp;</td>
                <td><input type="text" name="adr_city" id="adr_city" style="width: 98%;" value="{$page.adr_city}" /></td>
            </tr>
            
            <tr style="background-color: {cycle values="#eee,#fff"};">
                <td style="white-space: nowrap;" align="right" width="200">ZIP:&nbsp;</td>
                <td><input type="text" name="adr_zip" id="adr_zip" style="width: 98%;" value="{$page.adr_zip}" /></td>
            </tr>
            
            <tr style="background-color: {cycle values="#eee,#fff"};">
                <td style="white-space: nowrap;" align="right" width="200">Country:&nbsp;</td>
                <td><input type="text" name="adr_country" id="adr_country" style="width: 98%;" value="{$page.adr_country}" /></td>
            </tr>
            
            <tr style="background-color: {cycle values="#eee,#fff"};">
                <td style="white-space: nowrap;" align="right" width="200">Telephone:&nbsp;</td>
                <td><input type="text" name="tel_nr" id="tel_nr" style="width: 98%;" value="{$page.tel_nr}" /></td>
            </tr>
            
            <tr style="background-color: {cycle values="#eee,#fff"};">
                <td style="white-space: nowrap;" align="right" width="200">Fax Nr:&nbsp;</td>
                <td><input type="text" name="fax_nr" id="fax_nr" style="width: 98%;" value="{$page.fax_nr}" /></td>
            </tr>
            
            <tr style="background-color: {cycle values="#eee,#fff"};">
                <td style="white-space: nowrap;" align="right" width="200">E-Mail:&nbsp;</td>
                <td><input type="text" name="email" id="email" style="width: 98%;" value="{$page.email|default:''}" /></td>
            </tr>
            
            <tr style="background-color: {cycle values="#eee,#fff"};">
                <td style="white-space: nowrap;" align="right" width="200">Website:&nbsp;</td>
                <td><input type="text" name="url" id="url" style="width: 98%;" value="{$page.url|default:''}" /></td>
            </tr>
            
            <tr style="background-color: {cycle values="#eee,#fff"};">
                <td style="white-space: nowrap;" align="right" width="200">Map Longitude:&nbsp;</td>
                <td id="c1"><input type="text" name="gmaps_long" id="gmaps_long" style="width: 100px;" value="{$page.gmaps_long|default:'0.0'}" /> [<a href="javascript: getCoordinates();" class="admin">calculate</a>]</td>
            </tr>
            
            <tr style="background-color: {cycle values="#eee,#fff"};">
                <td style="white-space: nowrap;" align="right" width="200">Map Latitude:&nbsp;</td>
                <td><input type="text" name="gmaps_lat" id="gmaps_lat" style="width: 100px;" value="{$page.gmaps_lat|default:'0.0'}" /></td>
            </tr>
        </tbody>
    </table>    
</FIELDSET>